<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBasicAdvDataTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('basic_adv_data', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('adv_id')->default(0)->comment('广告位编号');
            $table->string('title')->nullable()->comment('广告标题');
            $table->string('big_title')->nullable()->comment('长标题');
            $table->string('description')->nullable()->comment('广告描述');
            $table->text('content')->nullable()->comment('广告内容');
            $table->string('links')->nullable()->comment('跳转链接');
            $table->integer('cover_id', false, true)->default(0)->comment('图片编号');
            $table->string('cover')->nullable()->comment('图片地址');
            $table->integer('click')->default(0)->comment('广告点击量');
            $table->tinyInteger('sort')->default(0)->comment('排序');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('basic_adv_data');
    }
}
